home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 41.zip / BS1 part 41 / STFX-soundsystemdisk.adf / sources / ZOUNDMON.CFILES / LetsHearIt.c < prev    next >
C/C++ Source or Header  |  1988-01-20  |  1KB  |  32 lines

  1. /*
  2.  * This tiny little program
  3.  * is just an example how
  4.  * to use my music routines.
  5.  * Link it with Zound.o
  6.  * and it'll be able to play a song
  7.  * This program was brought to you by
  8.  * AJ from Activas. Enjoy it!
  9.  *
  10.  * Note: PlayZound now takes to arguments:
  11.  * the first and the last part to be played.
  12.  * specifying 0,0 means: play the song as last saved.
  13.  * This parameter passing allows you to define
  14.  * different tunes in one datafile
  15.  * for example: the first tune could be
  16.  * from part  0 to part 45  (* PlayZound(0x00,0x46); *) and the second tune
  17.  * from part 46 to part 8e  (* PlayZound(0x46,0x8f); *)
  18.  *
  19.  */
  20.  
  21. main(argc,argv)int argc;char *argv[];
  22. { if(argc==3)
  23.   { if(LoadZound(argv[1],argv[2]))    /* Try to Load music */
  24.     { PlayZound(0,0);                 /* Start the music   */
  25.       for(;(*(char *)0xbfe001)&64;);  /* Wait for LMB      */
  26.       KillZound();                    /* Stop music        */
  27.       QuitZound();                    /* Free memory       */
  28.     }else AJMessage("\nIt won't work this way!\n");
  29.   }else AJMessage("Usage:  LetsHearIt  <SongData>  <SampleDirectory>\n");
  30. }
  31. AJMessage(mes)char *mes;{Write(Output(),mes,strlen(mes));}
  32.